<%inherit file="message_base.html" />

<%block name="head">
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/skins/simple/style.css') }" />
<link rel="stylesheet" type="text/css" href="${ static_url('markitup/sets/markdown/style.css') }" />
</%block>

<%block name="sidemain">

<div class="ly-view-message">
  <table class="baseinfo">
    <tbody>
      <tr>
    <td>${ _("Sender") }</td>
    <td class="sender"><a href="${ reverse_url('user:view') }?id=${ M.sender_id }" target="_blank">${ M.sender.username }</a></td>
      </tr>
      <tr>
    <td>${ _("Send time") }</td>
    <td class="sendtime">${ ftime(M.text.sendtime) } (${ htime(M.text.sendtime) })</td>
      </tr>
      <tr>
    <td>${ _("Subject") }</td>
    <td class="subject">${ M.text.subject }</td>
      </tr>
    </tbody>
  </table>
  <div class="body">${ M.text.body }</div>
</div>

<div class="ly-send-message">

  <div class="full-tbform">
    <form method="POST" action="${ reverse_url('message:reply', M.id) }">${ xsrf_form_html() }
      <p>
    <textarea name="text" id="text"></textarea>
      </p>
      <input class="blue-submit" type="submit" value="${ _('Submit') }" class="button" />
    </form>
  </div>

</div>

<script type="text/javascript" src="${ static_url('markitup/jquery.markitup.js') }"></script>
<script type="text/javascript" src="${ static_url('markitup/sets/markdown/set.js') }"></script>

<script type="text/javascript" >
   mySettings.previewParserPath = "/t/preview?markup_language=markdown&_xsrf=${ xsrf_cookie }";
   $(document).ready(function() {
      $("#text").markItUp(mySettings);
   });
</script>

</%block>
